<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use DB;

class MemberTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $faker = \Faker\Factory::create('zh_CN');

        $data = [];
        for ($i=0; $i < 500 ; $i++) { 
        	# code...
        	$data[] = [  

        		'username' => $faker->username,
        		'password' => bcrypt('654321'),
        		'gender'  => rand(1,3),
        		'mobile'  => $faker->phoneNumber,
        		'email'   => $faker->email,
        		'avatar'  => '/statics/avatar.jpg',
        		'created_at'=>  date('Y-m-d H:i:s'),
        		'type'     => rand(1,2),
        		'status'   => rand(1,2),
           
        	];
        }
        DB::table('member')-> insert($data);
    }
}
